﻿using compshop.Infrastructure;
using compshop.Modules.DepartmentList.View;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;

namespace compshop.Modules.DepartmentList
{
    public class DepartmentListModule: IModule
    {
        IUnityContainer container; 
        IRegionManager regionManager;

        public DepartmentListModule(IUnityContainer Container, IRegionManager RegionManager)
        {
            container = Container;
            regionManager = RegionManager;
        }

        public void Initialize()
        {
            regionManager.Regions[RegionNames.DepartmentListContent].Add(container.Resolve<DepartmentListView>());
        }
    }
}
